<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, maximum-scale=1.0, initial-scale=1, user-scalable=0">
        <!-- 引入样式文件 -->
        <link rel="stylesheet" href="{{ asset('css/vant.index.css') }}"/>
        <link rel="stylesheet" href="{{ asset('css/chatroom.css') }}"/>
        <title>数治科技-消息列表</title>
    </head>
    <body class="antialiasfangdajing.pnged">
        <div id="app">
            <form method="GET" action="{{url('chatroom/list')}}">
                <div class="search-view">
                    <div class="searchin">
                        <img class="fangdajing" src="{{ asset('img/fangdajing.png') }}" alt="">
                        <input type="text" name="keyword" placeholder="搜索" value="{{$keyword}}">
                        <input type="hidden" name="doctorid" value="{{$doctorId}}">
                    </div>
                </div>
            </form>
            <ul class="listview">
                @isset($list)
                    @foreach($list as $item)
                        <li class="list-item">
                            <a href="{{url('/chatroom?'. http_build_query(['client' => 'doctor', 'userid' => $doctorId, 'roomid' => $item['chatroom_id']]))}}">
                                <div class="itemleft">
                                    <img class="icon" src="{{$item['patient_img']}}" alt="{{$item['patient_name']}}">
                                </div>
                                <div class="itemmid">
                                    <p class="p1">{{$item['patient_name']}}</p>
                                    <p class="p2">{{$item['chat_content']}} </p>
                                </div>
                               <div class="itemright">
                                   <p>{{$item['chat_time']}}</p>
                               </div>

                            </a>
                        </li>
                    @endforeach
                @endisset
                @empty($list)
                    <div class="empty">暂无数据</div>
                @endempty
            </ul>
        </div>
    </body>

    <!-- 引入 Vue 和 Vant 的 JS 文件 -->
    <script src="{{ asset('js/vue.min.js') }}"></script>
    <script src="{{ asset('js/vant.min.js') }}"></script>
    <script src="{{ asset('js/jquery.min.js') }}"></script>
    <script src="{{ asset('js/rem.js') }}"></script>
</html>
